home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
clang
/
assem.zip
/
ASSEM.DOC
< prev
Wrap
Text File
|
1985-10-04
|
4KB
|
85 lines
Using ASSEM.BAT with DOS 2.10 DEBUG.COM
As most of us know IBM DOS Version 2.10 comes with an assembler in the form
of DEBUG.COM. DEBUG also includes an unassembler and services for reading
from and writing to disk. These services combine to make DEBUG the tool of
choice for writing and debugging small .COM programs. Where you run into
trouble is finding you have left out or duplicated a line when assembling
a program and the only way to correct your mistake is to back up and reenter
from where you made the mistake. Or how about when you are debugging and you
need to see two sections of code at the same time but they won't fit on screen
together. ASSEM.BAT provides an answer to these problems by combining the
power of DEBUG with the versatility of DOS 2.10.
By taking advantage of the redirection of standard input and output available
through DOS 2.10 and the conditional execution of BATCH files I have developed
a system which does the following:
-allows source code to be written and editted with EDLIN
-allows comments to be included with the source
-provides an output listing complete with comments, addresses,
and the precise location of any errors
-allows automated unassembly of .COM programs, including source
and object code and addresses
-includes command level syntax checking
Though not a replacement for the IBM or Microsoft Macro Assembler, this system
has proved to be a considerable improvement over DEBUG alone.
The assembly routine of ASSEM requires that the following conditions be met
upon execution:
-DEBUG is present
-filename.ASM exists
The assembly routine will search for both files. If either one is not found
the assembly is aborted. Otherwise filename.ASM is defined as the standard
input for DEBUG and filename.LST is defined as the standard output. If a .COM
file is to be produced the commands for doing so must be included in
filename.ASM for use by DEBUG. Note that ALL commands needed by DEBUG must
be included in filename.ASM, including the (Q)uit command. If the quit
command is left out the system will hang and the computer will have to be
rebooted. The usual commands needed by DEBUG are:
-(A)ssemble
-(R)egister CX (BX always =0000h for .COM files)
-(N)ame filename.COM
-(W)rite
-(Q)uit
Also be sure and include at least one blank line containing nothing but a
carriage return after the last source instruction. This is necessary toget
DEBUG out of the assembler and back to command level.
The unassembly routine requires that the following conditions be met
upon execution:
-DEBUG is present
-filename.COM exists
The unassembly routine will search for both files. If either one is not found
the unassembly is aborted. Otherwise filename.COM is defined as the standard
input for DEBUG and filename.FIL is defined as the standard output. The
routine will then ask for the commands to be used during the unassembly.
You will have to perform the unassembly manually before invoking this routine
in order to know the ranges you want to unassemble and those you want dumped.
The most common commands used in this routine are:
-(N)ame filename.COM
-(L)oad
-(R)egister CX (gives the program length)
-(U)nassemble
-(D)ump
-(Q)uit
Don't forget to include a quit command.
The syntax to be used when invoking ASSEM.BAT is:
-ASSEM f filename
where,
-f is A or a to assemble; U or u to unassemble
-filename is [d:][path]filename (never include an extension)
The file FUNCTION.ASM is included as an example. To produce a .COM file of
give the command "ASSEM A FUNCTION". It will take a minute or two for the
file to be assemble so be patient. The files FUNCTION.LST and FUNCTION.COM
will be generated. Try using the command "ASSEM U FUNCTION" to create an
unassembled listing of FUNCTION.COM.
Instructions for using the FUNCTION.COM program are in the file FUNCTION.DOC.
create an
unassembled listing of FUNCTION.COM.
Instructions for using the FUNCTION.COM program are i